package com.dq.service;

import com.spring.*;

/**
 * @ClassName: UserService
 * @Description: TODO
 * @Author: spring-source_小强 (QQ:2680825683)
 * @Since: 2023/5/8 9:03
 */
@Component("userService")
// @Scope("prototype") //原型bean
public class UserServiceImpl implements BeanNameAware, InitializingBean, UserService {

    @Autowired
    OrderService orderService;

    public String beanName; //自动把userService注入进来

    @Override
    public void setBeanName(String name) { //系统自动调用此方法
        beanName = name;
    }

    public String processTestName;

    public void setProcessTest(String processTestName) {
        this.processTestName = processTestName;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("init xxx");
    }

    @Override
    public void test() {
        System.out.println("orderService = " + orderService);
        System.out.println("beanName = " + beanName);
//        System.out.println("processTestName = " + processTestName);
    }


}
